{-# LANGUAGE OverloadedStrings #-}

import Data.List
import Text.LaTeX
import Text.LaTeX.Base.Class
import Text.LaTeX.Base.Syntax
import Text.LaTeX.Packages.Graphicx
import Text.LaTeX.Packages.Geometry
import Util

main :: IO ()
main = printdoc doc

doc :: Monad m => LaTeXT_ m
doc = do
    mapM_ thing [(x, y) | x <- [-3/64, 1/64 .. 65/64], y <- [-3/64, -2/64 .. 3/2]]

thing :: Monad m => (Double, Double) -> LaTeXT_ m
thing (x, y) = textblock' (vw x) (vw y) $ rotatebox' (360 * ((sin (4 * x + 4 * y)) / 8 +  (sin (0.4 * pi * x * y)) ^ 2)) $ fontsize (vh $ 0.01 + ((sin $ (x * y) * pi) ^ 2) / 32) (vh 0) "meow meow meow"
